<template>
    <div class="z">

        <div style="width: 92%;margin: auto;margin-top: 0.88rem;">
          <div class="con">
            <p>复制注册码</p>
            <p>邀请好友加入赛思医考帮</p>
            <p>共同学习，共同进步！</p>
          </div>
          <div class="yaoqing">
							<span>注册码：</span>
							<button v-clipboard:copy="recom_code"
													v-clipboard:success="onCopy"
													v-clipboard:error="onError">{{recom_code}}</button>
							<span v-clipboard:copy="recom_code"
													v-clipboard:success="onCopy"
													v-clipboard:error="onError">点击复制注册码</span>
          </div>
          <div class="shouyi">
            <p></p>
            <p>邀请方式</p>
            <p></p>
          </div>
          <p class="p1"> 点击复制注册码，发送给好友，好友注册时输入您的
正确注册码，即可成为您的邀请用户，可以与您共同学习，共同进步！</p>
        </div>
      <img src="../../../src/assets/img/person/ren.png" alt="" class="ren">
    </div>
</template>

<script>
	import { MessageBox } from 'mint-ui';
    export default {
        name: "Zhuce",
				data(){
					return{
						recom_code:'',  //邀请码
					};
				},
				methods:{
					onCopy () {
					  this.$toast({
					    message:'复制成功',
					  });
					},
					onError () {
					},
				},
				mounted(){
					this.sdk.getJSSDK('','',this.$store.state.url);	
					if(this.$route.query.token){
						// localStorage.setItem('token',this.$route.query.token);
						this.axios.defaults.headers.common['token'] = this.$route.query.token;
					}
					this.axios.get(this.$store.state.url + "User/getUserInfo").then(res=>{
					  // console.log(res.data)
					  if (res.data.errcode == 0||res.data.errcode == '0'){
							this.recom_code=res.data.data.recom_code;
					  }
					})
				}
				
    }
</script>

<style scoped>
  .z{
    background: url("../../../src/assets/img/person/beijing.png") no-repeat;
  }
  .ren{
    width: 6.94rem;
    position: absolute;
    bottom: 0;
    left: 0.56rem;
  }
  .con p{
    font-size:0.5rem;
    font-family:PingFang-SC-Heavy;
    font-weight:800;

  }
  .con p:nth-child(1){
    color:rgba(252,241,117,1);
  }
  .con p:nth-child(2),.con p:nth-child(3){
    margin-top: 0.25rem;
    color: #fff;
  }
  .yaoqing{
    margin-top: 0.5rem;
  }
  .yaoqing span:nth-child(1){
    font-size:0.26rem;
    font-weight:400;
    color:rgba(255,255,255,1);
  }
  .yaoqing button{
    width:1.25rem;
    height:0.48rem;
    background:rgba(255,255,255,1);
    border-radius:0.1rem;
    font-size:0.26rem;
    font-weight:bold;
    color:rgba(243,54,23,1);
    border: none;
    outline: none;
  }
  .yaoqing span:nth-child(3){
    font-size:0.26rem;
    font-weight:500;
    color:rgba(255,255,255,1);
    margin-left: 0.1rem;
  }
  .shouyi{
    display: flex;
    align-items: center;
    margin-top: 1rem;
    justify-content: space-between;
  }
  .shouyi p:nth-child(1),.shouyi p:nth-child(3){
    width:2.4rem;
    height:0.02rem;
    background:#C0DDFC;
    opacity:0.67;
  }
  .shouyi p:nth-child(2){
    font-size:0.26rem;
    font-weight:bold;
    color:#C0DDFC;
  }
  .p1{
    font-size:0.26rem;
    font-weight:400;
    color:#C0DDFC;
    line-height:0.46rem;
    margin-top: 0.3rem;
  }
</style>
